package com.wrupple.muba.catalogs.client.events;

import com.google.gwt.event.shared.GwtEvent;
import com.wrupple.muba.common.domain.FilterData;

public class FilterValueChangeEvent extends
		GwtEvent<FilterValueChangeEventHandler> {
	
	private final FilterData newValue;

	public static final Type<FilterValueChangeEventHandler> TYPE = new Type<FilterValueChangeEventHandler>();

	public FilterValueChangeEvent(FilterData newValue) {
		super();
		this.newValue = newValue;
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<FilterValueChangeEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(FilterValueChangeEventHandler handler) {
		handler.onFilterValueChanged(this);
	}

	public FilterData getNewValue() {
		return newValue;
	}

}
